package com.chainyoung.component_tmperson.ui.mvp.model;

import com.chainyoung.common.appcommon.db.DbConstant;
import com.chainyoung.common.appcommon.entity.HdWalletCache;
import com.chainyoung.common.appcommon.hdwallet.HdWalletDAO;
import com.chainyoung.common.integration.IRepositoryManager;
import com.chainyoung.common.mvp.BaseModel;
import com.chainyoung.component_tmperson.ui.mvp.contract.BrowserHistoryContract;
import com.chainyoung.component_tmperson.ui.mvp.contract.ConfirmPinCodeContract;
import com.chainyoung.component_tmperson.ui.mvp.model.dao.BrowseDAO;

import java.util.List;

import javax.inject.Inject;

import io.reactivex.Flowable;

public class ConfirmPinCodeModel  extends BaseModel implements ConfirmPinCodeContract.Model {

    private HdWalletDAO DAO = new HdWalletDAO(mRepositoryManager.obtainRealmConfig(DbConstant.DB_NAME));


    @Inject
    ConfirmPinCodeModel(IRepositoryManager repositoryManager) {
        super(repositoryManager);

    }



    @Override
    public Flowable<HdWalletCache> addHdWalletCache(HdWalletCache item) {
        return DAO.addHdWalletCache(item);
    }

    @Override
    public Flowable<List<HdWalletCache>> getAllHdWalletCaches(String coinType) {
        return DAO.getHdWalletCaches(coinType);
    }
}

